import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import { Provider } from "react-redux"; // 修正导入路径到 react-redux
import { store } from "./store"; // 导入你的 Redux store
import App from "./App.tsx";

// 添加类型断言确保 root 元素存在
const rootElement = document.getElementById("root");
if (!rootElement) throw new Error("Failed to find root element");
const root = createRoot(rootElement);

root.render(
  <StrictMode>
    <Provider store={store}>
      <App />
    </Provider>
  </StrictMode>,
);
